<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateOfficialChatQuestionTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('official_chat_question', function (Blueprint $table) {
            $table->smallIncrements('id');
            $table->string('key_word', 20)->default('')->comment('关键词');
            $table->text('offcial_answer')->comment('关键词回复');
            $table->unsignedTinyInteger('flag')->default(1)->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('official_chat_question');
    }
}
